package org.doubango.FrCall.Screens;

import org.doubango.FrCall.Engine;
import org.doubango.FrCall.R;
import org.doubango.FrCall.Services.IScreenService;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ScreenSearchedFriendInfo extends BaseScreen {
	
	private static String TAG = ScreenChatSip.class.getCanonicalName();
	private final IScreenService mScreenService;
	public static int i;
	
	private Button backToFriendViewFromFriendInfo;
	
	public ScreenSearchedFriendInfo() {
		super(SCREEN_TYPE.SEARCHED_FRIEND_INFO, TAG);
		mScreenService = ((Engine)Engine.getInstance()).getScreenService();
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.screen_searched_friend_info);
		
		backToFriendViewFromFriendInfo = (Button) findViewById(R.id.back_to_friend_view_from_friend_info);
		SearchedFriendInfoButtonListener searchedFriendInfoButtonListener = new SearchedFriendInfoButtonListener();
		backToFriendViewFromFriendInfo.setOnClickListener(searchedFriendInfoButtonListener);
	}
	
	private class SearchedFriendInfoButtonListener implements OnClickListener{
		@Override
		public void onClick(View v) {
			if(v == backToFriendViewFromFriendInfo){
				if(i == 1) mScreenService.show(ScreenSearchFriendById.class);
				else if(i == 2) mScreenService.show(ScreenSearchFriendByNickname.class);
				else if(i == 3) mScreenService.show(ScreenSearchFriendByRule.class);
				else if(i == 4) mScreenService.show(ScreenSearchFriendNearbyResult.class);
			}
		}
		
	}
	

}
